var arr=["America","Greece","Britain","Canada","China","Egypt"];
var count=0;
for(var i=0;i<arr.length;i++){
    if(arr[i].indexOf("a")!=-1||arr[i].indexOf("A")!=-1){
        count++;
    }
}
for(var i in arr){
    document.write(arr[i]+"<br/>");
}
document.write("共有"+count+"个字符中包含a或A");
